/* enum */
import { BaseSelectUserComponentNameEnum } from '@src/component/common/BaseSelectUser/model'
/* scss */
import '@src/component/common/BaseSelectUser/components/Form/item.scss'
/* vue */
// @ts-ignore
import { ComponentInstance, ComponentRenderProxy, defineComponent, PropType } from 'vue'
import { CommonComponentInstance } from '@model/VC'
import { CreateElement } from 'vue'

export type FormItemProps = {
  label: string;
}

export interface FormItemSetupState {
  
}

export enum FormItemEmitEventNameEnum {
  Input = 'input',
}

export type FormItemInstance = ComponentInstance & FormItemSetupState
export type FormItemVM = ComponentRenderProxy<FormItemProps> & CommonComponentInstance & FormItemInstance

export default defineComponent({
  name: BaseSelectUserComponentNameEnum.BaseSelectUserFormItem,
  emits: [
    FormItemEmitEventNameEnum.Input
  ],
  props: {
    label: {
      type: String as PropType<string>,
      default: '',
      required: true
    }
  },
  setup(props: FormItemProps, { emit }) {
    
    
  },
  render(h: CreateElement) {
    return (
      <div class={BaseSelectUserComponentNameEnum.BaseSelectUserFormItem}>
        
        <div class="base-select-user-form-item__label">
          <label>
            { this.label }：
          </label>
        </div>
        
        { this.$slots.default }
        
      </div>
    )
  }
})
